<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>

<body>
<script>

var s1 = "abc";
var s2 = "123";
var r = /(?:\w*?)|(?:\d*?)/;	// 非引用型分组
var a = r.test(s1); 			// 返回true
var b = r.test(s2); 			// 返回true

alert(RegExp.$1); 



</script>
</body>
</html>
